package com.zlkj.pro.modular.common.service;

import com.alipay.api.response.AlipayFundTransUniTransferResponse;
import com.alipay.api.response.AlipayTradeRefundResponse;
import com.zlkj.pro.modular.common.service.impl.PayServiceImpl;

import java.math.BigDecimal;
import java.util.Map;

/**
 * @author 孙铭泽
 * @date 2022/3/28
 * @time 13:49
 */
public interface PayService {

    Map<String, String> wechatPay(String notifyPath, String outTradeNo, String body, BigDecimal totalFee);

    String aliPay(String notifyPath, String outTradeNo, String subject, BigDecimal amount);

    String aliPayWeb(String notifyPath, String returnPath, String outTradeNo, String subject, BigDecimal amount);

    <D extends PayServiceImpl.PayCallback> String wechatCallback(String notifyXml, Class<D> callbackClass);

    <D extends PayServiceImpl.PayCallback> String alipayCallback(Map<String, String[]> parameterMap, Class<D> callbackClass);

    AlipayFundTransUniTransferResponse transfer(String outBizNo, String identity, String name, BigDecimal transAmount);

    AlipayTradeRefundResponse alipayRefund(String outTradeNo, String totalAmount);

}
